package dao;

import domain.Employee;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.ArrayList;
import java.util.List;

public class EmployeeDao implements IEmployeeDao {
    private SqlSessionTemplate sqlSession;

    public List<Employee> findEmployee(Employee employee) {
        List<Employee> employees = new ArrayList<Employee>();
        employees = sqlSession.selectList("findEmployee", employee);
        return employees;
    }

    public SqlSessionTemplate getSqlSession() {
        return sqlSession;
    }

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }
}
